from flask import Flask
# from exts import mail
import config
from bluePrints.query import bpQuery
from bluePrints.test import bpTest
from gevent import pywsgi
app = Flask(__name__)


@app.route('/')
def Hello():
    return 'Hello Flask'


# 绑定配置文件
app.config.from_object(config)
# 初始化
# mail.init_app(app)
# 绑定蓝图
app.register_blueprint(bpQuery)
app.register_blueprint(bpTest)
if __name__ == '__main__':
    server = pywsgi.WSGIServer((config.IP, 5000), app)
    server.serve_forever()
    # app.run(debug=True, host=config.IP, port=5000)
